[ToC] [Up] [Back] [Next] ... [Book Plug] The Information Commons
.................... Introduction to HTML

4.3 Marking Paragraphs

The P element marks a block of text as a paragraph -- the tag <P> marks the beginning of the paragraph, while the tag </P> marks the end of a paragraph. The end tag, however, is optional, as a paragraph is automatically ended when you start another paragraph, or when you start a heading, blockquote, list, table or form.

In general, a browser will add appropriate spacings and indents to indicate the paragraph. Note that the Netscape Navigator often adds extra vertical spacing after a paragraph if you end the paragraph with a </P> end tag. This is a "bug" with Netscape, but can be used as a "feature" if you want to more finely control line spacings between a paragraph and a following element such as a table or a horizontal rule

For example, the above text, including the heading, was marked up as follows:

  <p> The P element marks a 
  block of text as a paragraph -- the tag <code>&lt;P></code>
  marks the beginning of the paragraph, while the tag
  <code>&lt;/P></code> marks the end of a paragraph. The end
  tag, however, is optional, as a paragraph is automatically
  ended when you start another paragraph, or when you start
  a heading, blockquote, list, table or form.</p>

  <p>In general, a browser will add appropriate spacings and
  indents to indicate the paragraph. Note that the Netscape
  Navigator often adds extra vertical spacing after a paragraph
  if you end the   paragraph with a <code>&lt;/P></code> 
  end tag. This is a "bug" with Netscape, but can be used
  as a "feature" if you want to more finely control line
  spacings between a paragraph and a following element such
  as a table or a horizontal rule</p>

4.3.1 Changes for HTML 3: Paragraph Alignment

HTML 3 proposed that paragraph elements take the attributes ALIGN, to control the alignment of text, and ID to act as a location marker for the paragrah. More specifically
ALIGN = "left" | "center" | "right" | "justify" (... examples)
ALIGN controls the alignment of text within the paragraph. Left and right alignment flush the text with the left and right margins, respectively, while center alignment centers the text. Justify should left and right justify the text. The Netscape navigator Version 2.0 understands left, right and center alignment values, while earlier versions (1.2 and less) understand only left and center alignment. Please select the "examples" anchor above to see examples of the different alignments.
ID = "name_token" (not widely supported)
Mark the paragraph for a possible reference via a URL. [NOTE: In HTML 3 ID will replace the NAME attribute, currently used to reference hypertext link targets]. This is currently only supported by the Emacs-w3 browser. The value assigned to ID is a name token.

[ToC] [Up] [Back] [Next] ... [Book Plug] .................... Introduction to HTML

© Ian Graham 1994-1995 Page Last Updated: 4 December 1995